package model;
import java.util.Date;

public class AuctionBean {
	
	private int		id		=	0;
	private	String	name	=	"";
	private String	pic		=	"";
	private String	details	=	"";
	private	int		owner	=	0;
	private double	price	=	0; //id of bid
	private Date	end		=	null;
	
	public	int		getID()			{	return id;		}
	public	String	getName()		{	return name;	}
	public	String	getPic()		{	return pic;		}
	public	String	getDetails()	{	return details;	}
	public	int		getOwner()		{	return owner;	}
	public	double	getPrice()		{	return price;	}
	public	Date	getEnd()		{	return end;		}
	
	public	long	getRemainingTime()	{	return getEnd().getTime() - new Date().getTime();	}
	
	public	void	setID(int id)				{	this.id			=	id;			}
	public	void	setName(String name)		{	this.name		=	name;		}
	public	void	setPic(String pic)			{	this.pic		=	pic;		}
	public	void	setDetails(String details)	{	this.details	=	details;	}
	public	void	setOwner(int owner)			{	this.owner		=	owner;		}
	public	void	setHighBid(double price)	{	this.price		=	price;		}
	public	void	setEns(Date end)			{	this.end		=	end;		}
	
	public	void	setAll(int id, String name, String pic, String details, int owner, double price, Date end){
		this.id			=	id;
		this.name		=	name;
		this.pic		=	pic;
		this.details	=	details;
		this.owner		=	owner;
		this.price		=	price;
		this.end		=	end;
	}
	
}
